import React, { Component } from 'react';
class lybqcc extends Component {
  constructor(props) {
    super(props);
    // this.props = props;
    this.state = {}
  }
  componentDidMount() {
    // const search = this.props.location.search;
    // const params = new URLSearchParams(search);
    // const name = params.get('params');
    // console.log(params,name);
  }
  render() {
    //  query传参刷新后获取不到
    // console.log(this.props.location.state.name) 
    // console.log(this.props.location)

    // const search = this.props.location.search;
    // const params = new URLSearchParams(search);
    // const name = params.get('params');
    // console.log(params,name);
    console.log(111111);
    return (
      <div>
        <div>标签传参:{this.props.location.query ? this.props.location.query.name : ''}</div>

      </div>
    );
  }
}

export default lybqcc;